// 路由配置
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";

// 首页
import HomeView from "@/pages/index.vue";

const routes: Array<RouteRecordRaw> = [
  {
    // 匹配根路径，重定向到默认 id
    path: "/",
    redirect: "/classBulletinBoard/06230001", // 这里的 defaultId 是默认值，可按需修改
  },
  {
    path: "/classBulletinBoard/:id",
    name: "Home",
    component: HomeView,
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

// 路由守卫
router.beforeEach((_to, _from, next) => {
  next();
});

export default router;


